'use strict';
// 将当前的模板转成table展示所需格式
angular.module('fbdApp.templateModule')

.filter('showCurrentTemp', function() {
  return function(currentTemp) {
    var array = [];
    var main = currentTemp.includes[0];
    var layer = currentTemp['rules'][main]['subset'];
    layer.includes.forEach(function(ruleName) {
      var rule = layer['rules'][ruleName];
      var struct = rule;
      if (struct.subset) {
        delete struct.subset;
      }
      array.push(struct);
    });
    return array;
  }
});
